from selenium import webdriver
import time

wd = webdriver.Chrome()

wd.get("http://172.16.60.11")
wd.maximize_window()
wd.implicitly_wait(10)

# 点击登录按钮
wd.find_element_by_xpath("//../span[text() = '用户中心登录']").click()

# 输入邮箱
wd.find_element_by_xpath("//input[@placeholder= '邮箱']").send_keys("user@forensix.cn")

# 输入密码
wd.find_element_by_xpath("//input[@placeholder = '密码']").send_keys("123456")

# 点击“授权并登录”按钮
wd.find_element_by_xpath("//span[text() = '授权并登录']").click()


time.sleep(2)
js = "window.open('http://172.16.60.11/police/detail/20200828195801281?activeTab=evidence')"
wd.execute_script(js)



print(wd.current_url)
